<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>列表渲染v-for循环</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="div">
        <ul>
            <!-- 数组 -->
            <li v-for="name in names">
                {{name}}
            </li>
            <br>
            <!-- 对象,遍历属性，找到对应的属性值 -->
            <li v-for="value in student">
                {{value}}
            </li>
        </ul>
    </div>  
</body>
<script>
    new Vue({
        el : "#div",
        data : {
            names : ["貂蝉","小乔","杨玉环","王昭君"],
            student : {
                name : "张三",
                age : 23
            }
        }
    });
</script>
</html>